﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MsTestUtilities
{
    internal class Setable<E>
    {
        private E _value;

        public E Value {
            get { return _value; }
            set { 
                IsSet = true;
                _value = value;
            }
        }

        public bool IsSet { get; private set; }

        public Setable()
        {
        }

        public Setable(E value)
        {
            Value = value;
        }

        public static explicit operator Setable<E>(E value)
        {
            return new Setable<E>(value);
        }
    }
}
